<div class="col-sm-9">
    <ul class="list-group">
        <button type="button" class="btn btn-default" data-toggle="modal" data-target="#exampleModal">
            <i class="glyphicon glyphicon-open"></i> 添加图片</a></button>
        <br><br>

        <li class="list-group-item">
            <img src="__STATIC__/index/ad/{$list.name}" width="32%" display="inline-block">
            <span style="margin-left:48%" display="inline-block">
                <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
                    <i class="glyphicon glyphicon-plus"></i> 更改</a></button>
                <a href="{:url('admin/ad/delete',['id'=>$list.id])}" class="btn btn-danger">
                    <i class="glyphicon glyphicon-remove"></i> 删除</a>
            </span>
        </li>

    </ul>


    <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
         aria-hidden="true">
        <div class="modal-dialog modal-lg" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel">上传文件 </h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true"> &times; </span>
                    </button>
                </div>
                <div class="modal-body">
                    <div class="file-loading">
                        <input id="input-b9" name="banner" multiple type="file">
                    </div>
                    <div id="kartik-file-errors"></div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal"> 关闭</button>
                    <button type="button" class="btn btn-success" onclick="reloadPage()"> 保存</button>
                </div>
            </div>
        </div>
    </div>

    <script>
        document.getElementById()
        $(document).on('ready', function () {
            $("#input-b9").fileinput({
                showPreview: false,
                showUpload: true,
                elErrorContainer: '#kartik-file-errors',
                allowedFileExtensions: ["jpg", "png", "gif"],
                uploadUrl: "{:url('admin/ad/create')}"
            });
        });

        function reloadPage() {
            location.reload()
        }
    </script>
</div>